package com.liohi.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.liohi.entity.Role;
import com.liohi.service.RoleService;
import com.liohi.mapper.RoleMapper;
import org.springframework.stereotype.Service;

/**
* @author liohi
* @description 针对表【role】的数据库操作Service实现
* @createDate 2023-08-02 15:10:31
*/
@Service
public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role>
    implements RoleService{

    @Override
    public Integer getRoleIdByName(String name) {
        return baseMapper.selectOne(new QueryWrapper<Role>().eq("name",name)).getRoleId();
    }
}




